package br.com.iswe.gwt.ui.client.comp;

import br.com.iswe.gwt.util.client.FlatMap;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

public class WrappedWidgetBag extends Composite implements PropertiesBag{

	
	public WrappedWidgetBag(Widget widget){
		initWidget(widget);
	}
	
	private FlatMap bean = FlatMap.getInstance();

	public String getPropriedade(String chave) {
		return bean.getString(chave);
	}

	public void setPropriedade(String chave, String valor) {
		bean.put(chave, valor);
	}

	public void setBean(FlatMap bean) {
		this.bean.putAll( bean );
	}

	public FlatMap getBean() {
		return bean;
	}

}
